.class Lcom/htc/android/footprints/activity/ListModeNewActivity$11;
.super Ljava/lang/Object;
.source "ListModeNewActivity.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/htc/android/footprints/activity/ListModeNewActivity;->onCreateDialog(I)Landroid/app/Dialog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/activity/ListModeNewActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 616
    iput-object p1, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 7
    .parameter "dialog"
    .parameter "which"

    .prologue
    const/4 v4, 0x1

    .line 617
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    .line 618
    packed-switch p2, :pswitch_data_0

    .line 645
    :goto_0
    return-void

    .line 620
    :pswitch_0
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    #setter for: Lcom/htc/android/footprints/activity/ListModeNewActivity;->cursorMayBeDirty:Z
    invoke-static {v3, v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->access$1502(Lcom/htc/android/footprints/activity/ListModeNewActivity;Z)Z

    .line 621
    new-instance v2, Landroid/content/Intent;

    const-string v3, "com.htc.android.footprints.activity.FootprintDetailEditActivity"

    invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 624
    .local v2, intent:Landroid/content/Intent;
    :try_start_0
    const-string v3, "DATA"

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    #getter for: Lcom/htc/android/footprints/activity/ListModeNewActivity;->selectedFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->access$1400(Lcom/htc/android/footprints/activity/ListModeNewActivity;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 625
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    const/16 v4, 0x190

    invoke-virtual {v3, v2, v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->startActivityForResult(Landroid/content/Intent;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 627
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 628
    .local v0, ex:Ljava/lang/Exception;
    const-string v3, "ListModeActivity"

    const-string v4, "Disable to launch edit mode"

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 632
    .end local v0           #ex:Ljava/lang/Exception;
    .end local v2           #intent:Landroid/content/Intent;
    :pswitch_1
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    const/4 v4, 0x6

    invoke-virtual {v3, v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->showDialog(I)V

    goto :goto_0

    .line 635
    :pswitch_2
    new-array v1, v4, [Lcom/htc/android/footprints/vo/Footprint;

    const/4 v3, 0x0

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    #getter for: Lcom/htc/android/footprints/activity/ListModeNewActivity;->selectedFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->access$1400(Lcom/htc/android/footprints/activity/ListModeNewActivity;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v4

    aput-object v4, v1, v3

    .line 636
    .local v1, footprints:[Lcom/htc/android/footprints/vo/Footprint;
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    #getter for: Lcom/htc/android/footprints/activity/ListModeNewActivity;->selectedFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->access$1400(Lcom/htc/android/footprints/activity/ListModeNewActivity;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v4

    iget-object v4, v4, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    const-string v5, " "

    const-string v6, "_"

    invoke-virtual {v4, v5, v6}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4, v1}, Lcom/htc/android/footprints/utils/FootprintUtils;->exportKMZ(Landroid/app/Activity;Ljava/lang/String;[Lcom/htc/android/footprints/vo/Footprint;)V

    goto :goto_0

    .line 640
    .end local v1           #footprints:[Lcom/htc/android/footprints/vo/Footprint;
    :pswitch_3
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    invoke-virtual {v3}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ListModeNewActivity$11;->this$0:Lcom/htc/android/footprints/activity/ListModeNewActivity;

    #getter for: Lcom/htc/android/footprints/activity/ListModeNewActivity;->selectedFootprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v4}, Lcom/htc/android/footprints/activity/ListModeNewActivity;->access$1400(Lcom/htc/android/footprints/activity/ListModeNewActivity;)Lcom/htc/android/footprints/vo/Footprint;

    move-result-object v4

    invoke-static {v3, v4}, Lcom/htc/android/footprints/utils/FootprintUtils;->saveAsContacts(Landroid/content/Context;Lcom/htc/android/footprints/vo/Footprint;)V

    goto :goto_0

    .line 618
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method
